package com.xxx.webdemo;

import com.xxx.service.HelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by louisyuu on 2020/5/6 下午2:55
 */

@RestController
@RequestMapping("/demo")
public class DemoController {


    @Reference(timeout = 4000, loadbalance = "roundrobin")
    private HelloService helloService;

    @RequestMapping("/get")
    public String getFromA() {
        return helloService.sayHello("world", 0);
    }


}
